<?php
include_once('common/header.php');
if($AppUI->id <=0 || ($AppUI->id > 0 && $AppUI->type < 2) || isset($_SESSION['admin']) && ($_SESSION['admin']&4)==0) {
	$this->_redirect(isset($_SESSION[SESSION_BACKURL]) ? $_SESSION[SESSION_BACKURL] : HOST_BACKEND);
}
$intAdminId	= $objRequest->getParam('adminid', 0);
$objAdmin 	= new Admin();
$arrInfo	= $objAdmin->get($intAdminId);
$arrList	= $objAdmin->getAllCombox($AppUI->type);
$arrSection	= $objAdmin->getSection();
$arrAPerm	= array();
if($arrSection) {
	foreach($arrSection as $row) {
		$row['perm'] = $objAdmin->getPermission($intAdminId, $row['sectionid']);
		$arrAPerm[]	 = $row;
	}
}
$this->view->arrAPerm 	= $arrAPerm;
$this->view->arrInfo	= $arrInfo;
$this->view->arrList	= $arrList;
$this->view->intAdminId	= $intAdminId;
